/**
 * 
 */
package com.cupdata.ch4;

import com.cupdata.ch4.factory.NYPizzaIngredientFactory;
import com.cupdata.ch4.factory.PizzaIngredientFactory;

/**
 * @author Minsk
 *
 * @since  2017年4月18日
 */
public class ChicagoPizzaStore extends PizzaStore {
	/* (non-Javadoc)
	 * @see com.cupdata.ch4.PizzaStore#createPizza(java.lang.String)
	 */
	@Override
	protected Pizza createPizza(String item) {
		Pizza pizza = null;
		PizzaIngredientFactory ingredientFactory = new NYPizzaIngredientFactory();
		
		if ("cheese".equals(item)) {
			pizza = new CheesePizza(ingredientFactory);
			pizza.setName("Chicago Style Cheese Pizza");
		} else if ("veggie".equals(item)) {
			pizza = new VeggiePizza(ingredientFactory);
		} else if ("clam".equals(item)) {
			pizza = new ClamPizza(ingredientFactory);
			pizza.setName("Chicago Style Clam Pizza");
		}
		return pizza;
	}

}
